#!/usr/bin/env python
# -*- coding: utf-8 -*-

#-*-
# UbiNote - A Lightweight Note-talking Application
#
# Copyright (C) 2006-2009 Shellex <5h3ll3x@gmail.com>
#
# UbiNote is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# UbiNote is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with UbiNote; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA


mapping = [
#   (path_pattern, qs_pattern, callback) 
    ('sayHello.do', 'who,ps', 'actions.test.say_hello'),
    ('listNote.do', 'count', 'actions.note_strategy.list_note'),
    ('listNote.do', '', 'actions.note_strategy.list_note'),
    ('addNote.do', 'title', 'actions.note_strategy.add_note'),
    ('removeNote.do', 'id', 'actions.note_strategy.remove_note'),
    ('renameNote.do', 'id,title', 'actions.note_strategy.rename_note'),

    ('listTag.do', 'count', 'actions.tag_strategy.list_tag'),
    ('listTag.do', '', 'actions.tag_strategy.list_tag'),
    ('listBlockTag.do', 'block_id', 'actions.tag_strategy.list_block_tag'),
    ('saveBlockTag.do', 'block_id,tags', 'actions.tag_strategy.save_block_tag'),
    
    ('listBlock.do', 'note_id', 'actions.block_strategy.list_block'),
    ('addBlock.do', 'note_id', 'actions.block_strategy.add_block'),
    ('saveBlockPos.do', 'ordered_ids', 'actions.block_strategy.save_block_pos'),
    ('saveBlockContent.do', 'id, content' ,'actions.block_strategy.save_block_content'),
    ('removeBlock.do', 'id', 'actions.block_strategy.remove_block'),

]
